﻿<UserControl xmlns:my1="clr-namespace:Liquid;assembly=Liquid.TreeView"  x:Class="CCForm.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    mc:Ignorable="d"
    d:DesignHeight="419" d:DesignWidth="900" 
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
              xmlns:liquidTreeView="clr-namespace:Liquid;assembly=Liquid.TreeView"
    xmlns:liquidMenu="clr-namespace:Liquid;assembly=Liquid.Menu"
xmlns:my="clr-namespace:Toolbar" 
             xmlns:my2="clr-namespace:Liquid;assembly=Liquid.Menu">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="225" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"   />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <sdk:TabControl Height="1200" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" 
                        Name="tabControl1" VerticalAlignment="Top"
                        MinWidth="220" >
            <sdk:TabItem Header="工具箱" Name="tabItem1">
                <Grid>
                    <!-- 工具栏  -->
                        <ListBox Name="ListBox1" Background="AliceBlue" Width="220"
                     HorizontalAlignment="Right" VerticalAlignment="Top"  >
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Width="200" Height="24" Orientation="Horizontal" >
                                        <Border BorderThickness="1">
                                            <Image Source="{Binding IcoImage}" 
                                       Width="24"
                                   Height="24" Margin="10,0,0,0"
                                   Tag="{Binding IcoName}"
                                       MouseLeftButtonDown="Toolbox_MouseLeftButtonDown"
                                   HorizontalAlignment="Left" />
                                        </Border>
                                        <TextBlock AllowDrop="False" Margin="0,0,0,0" 
                                       Text="{Binding IcoNameText}"
                                       Tag="{Binding IcoName}"
                                       FontSize="14"
                                       MouseLeftButtonDown="Toolbox_MouseLeftButtonDown"
                                       HorizontalAlignment="Left" />
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    <!-- end工具栏  -->
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="节点表单" Name="tabItem2">
                <Canvas Name="zz_NodeCanvas" 
                        MouseLeftButtonDown="zz_NodeCanvas_MouseLeftButtonDown"
                        MouseLeftButtonUp="zz_NodeCanvas_MouseLeftButtonDown" >
                     
                    <sdk:TreeView Height="1200" HorizontalAlignment="Left"
                                  Margin="0,0,0,0" 
                                  VerticalAlignment="Top" Width="220" 
                                  Name="treeView_Node"  />

                    <liquidMenu:Menu x:Name="muNodeFrm" 
                                     Visibility="Collapsed" Height="280" 
                                     Width="150" >
                        <liquidMenu:MenuItem Name="DeFrm" Text="设计" Icon="./Img/Menu/deFrm.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="NewFrm" Text="新建流程表单"  Icon="./Img/Menu/New.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="EditFrm" Text="表单属性"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />

                        <liquidMenu:MenuItem Name="FrmAction" Text="表单事件" Icon="./Img/Menu/Event.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />
                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="RefFrm" Text="增加/移除表单"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />
                        <liquidMenu:MenuItem Name="FrmUp" Text="上移"  Icon="./Img/Menu/Up.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />
                        <liquidMenu:MenuItem Name="FrmDown" Text="下移" Icon="./Img/Menu/Down.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />

                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="DeleteFrm" Text="删除" Icon="./Img/Menu/Delete.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />
                        <liquidMenu:MenuItem Name="FrmRef" Text="刷新"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />
                    </liquidMenu:Menu>
                </Canvas>
            </sdk:TabItem>
            <sdk:TabItem Header="流程表单" Name="tabItem3" Visibility="Collapsed" >
                <Canvas Name="zz_FlowCanvas" >
                    <sdk:TreeView Height="1200" HorizontalAlignment="Left"
                                  Margin="0,0,0,0" 
                                  VerticalAlignment="Top" Width="220" 
                                  MouseLeftButtonDown="BindTreeView_li_MouseLeftButtonDown" 
                                  Name="treeView_Flow"  />
                    <liquidMenu:Menu x:Name="muFlowFrm" 
                                     Visibility="Collapsed" Height="100" 
                                     Width="150" >
                        <liquidMenu:MenuItem ID="OpenFlow" Text="打开"  Icon="./Img/Menu/Open.png"  />
                        <liquidMenu:MenuItem ID="EditFrm" Text="增加/移除表单" />
                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem ID="Up" Text="上移"  Icon="./Img/Menu/Up.png" />
                        <liquidMenu:MenuItem ID="Down" Text="下移" Icon="./Img/Menu/Down.png" />
                    </liquidMenu:Menu>
                </Canvas>
            </sdk:TabItem>
        </sdk:TabControl>

        <Image Height="32" HorizontalAlignment="Stretch" Name="image1" Stretch="Fill" Grid.Column="0" Grid.Row="0"
               Grid.ColumnSpan="2"
               VerticalAlignment="Top" Source="/CCForm;component/Img/menuBK.png" />
        
        <my:Bar Margin="0,1,0,0"  HorizontalAlignment="Left"   Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
                      x:Name="toolbar1" 
                    VerticalAlignment="Top" >

        </my:Bar>
        <my:Bar Margin="600,1,0,0"  HorizontalAlignment="Right"   Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
                      x:Name="toolbar_eleFunc" 
                    VerticalAlignment="Top" >
        </my:Bar>

        <ScrollViewer Height="800"  Grid.Column="1" Grid.Row="1" 
                       Width="790"
                      HorizontalAlignment="Left"  Margin="0,0,0,0" 
                      Name="scrollViewer1" 
                      VerticalAlignment="Top"
                      VerticalScrollBarVisibility="Auto" 
                      HorizontalScrollBarVisibility="Auto" >
            <ScrollViewer.Content>
                <!-- 画版 -->
                <Canvas VerticalAlignment="Top"  Margin="0,0,0,0" 
                Background="Beige" 
                HorizontalAlignment="Left"
                        Height="710"
                        Width="790"
                        Name="canvasMain"
                MouseLeftButtonDown="canvasMain_MouseLeftButtonDown" 
                MouseLeftButtonUp="canvasMain_MouseLeftButtonUp" 
                MouseRightButtonDown="canvasMain_MouseRightButtonDown" 
                MouseMove="canvasMain_MouseMove">
                    <Canvas.Effect>
                        <DropShadowEffect Color="Gray"></DropShadowEffect>
                    </Canvas.Effect>

                    <liquidMenu:Menu x:Name="muFrm" Visibility="Collapsed"   Width="190" >
                        <liquidMenu:MenuItem Name="FrmTempleteExp" Text="导出表单模版" Icon="./Img/Menu/Download.png" 
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"/>
                        <liquidMenu:MenuItem Name="FrmTempleteShareIt" Text="共享此模板" Icon="./Img/Menu/Share.png" 
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="FrmTempleteImp" Text="导入表单模版"   Icon="./Img/Menu/Upload.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="FrmTempleteShare" Text="共享表单模板库"   Icon="./Img/Menu/ShareNet.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="FrmTempleteWord" Text="导入Word模版"
                                             Icon="./Img/Menu/Word.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="FrmDo" Text="撤消"  Icon="./Img/ForwardDo.png"  MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="FrmUnDo" Text="恢复"  Icon="./Img/Undo.png"  MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="AdvAction" Text="表单事件" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="AdvUAC" Text="表单访问权限"    MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="FrmBill" Text="单据打印模板" Icon="./Img/Menu/Word.png"
                                             MouseLeftButtonDown="muItem_MouseLeftButtonDown"  />

                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="FullScreen" Text="全屏/取消屏幕" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="GradeLine" Text="显示/隐藏网格" Icon="./Img/Menu/Grid.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="eleTabIdx" Text="设置Tab顺序键" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"  />
                    </liquidMenu:Menu>

                    <liquidMenu:Menu x:Name="muElePanel"  Visibility="Collapsed" Width="190" >
                        <liquidMenu:MenuItem Name="eleEdit" Text="编辑"  Icon="./Img/Menu/Edit.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        
                        <liquidMenu:MenuItem Name="eleDel" Text="删除" Icon="./Img/Menu/Delete.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="eleHid" Text="隐藏" Icon="./Img/Menu/Hidden.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuItem Name="eleCopyTo" Text="批处理" Icon="./Img/Copy.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        
                        <!--<liquidMenu:MenuItem Name="eleCancel" Text="取消" Icon="./Img/Menu/Cancel.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"  />-->
                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="eleDtlFrm" Text="设计明细表表单"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"  />
                        <liquidMenu:MenuDivider />

                        <liquidMenu:MenuItem Name="FrmTempleteExp_Ext" Text="导出表单模版" Icon="./Img/Menu/Download.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"/>
                        <liquidMenu:MenuItem Name="FrmTempleteImp_Ext" Text="导入表单模版"   Icon="./Img/Menu/Upload.png"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="FrmTempleteWord_Ext" Text="导入Word模版"
                                             Icon="./Img/Menu/Word.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />

                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="AdvActionExt" Text="表单事件" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="AdvUACExt" Text="表单访问权限"  Icon="./Img/Menu/Grid.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        
                        <liquidMenu:MenuDivider />
                        <liquidMenu:MenuItem Name="FullScreen_Ext" Text="全屏/取消屏幕" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="GradeLine_Ext" Text="显示/隐藏网格"  Icon="./Img/Menu/Grid.png" MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown" />
                        <liquidMenu:MenuItem Name="eleTabIdx_Ext" Text="设置Tab顺序键"
                                             MouseLeftButtonDown="UI_muElePanel_Btn_MouseLeftButtonDown"  />
                        
                        
                          
                    </liquidMenu:Menu>

                </Canvas>
                <!-- end 画版 -->
            </ScrollViewer.Content>
        </ScrollViewer>
        
        <!-- checkBox . -->
        <!-- end checkBox . -->
        
    </Grid>
</UserControl>
